<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8"/>
    <title>JMP-Java应用监控系统</title>
    <link rel="shortcut icon" href="/ico/favicon.ico" />
    <link rel="stylesheet" href="/lib/layui/css/layui.css"/>
</head>
<style>
    .layui-layout-admin .layui-body {
        bottom: 0px;
    }
</style>
<body>
<div class="layui-layout layui-layout-admin">
    <div class="layui-header" style="width: 200px">
        <div class="layui-logo">JMP-Java应用监控系统</div>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree"  lay-filter="test">
                <!--首页-->
                <li class="layui-nav-item"><a onclick="index()" href="javascript:void(0)"><i class="layui-icon">&#xe68e;</i>&nbsp;首页</a></li>

                <!--远程主机-->
                <li class="layui-nav-item" th:each="item:${list}">
                    <a class="" href="javascript:void(0)"><i class="layui-icon">&#xe665;</i>&nbsp;<span th:text="${item.get('address').name}"></span></a>
                    <dl class="layui-nav-child" th:each="j:${item.get('jps')}">
                        <dd>
                            <a th:onclick="'step(\''+${item.get('address').address}+'\','+${j.key}+')'" href="javascript:void(0)" th:text="${j.value.smallName}" th:title="${j.value.smallName}"></a>
                        </dd>
                    </dl>
                </li>

                <!--关于-->
                <li class="layui-nav-item">
                    <a class="" href="javascript:void(0)"><i class="layui-icon">&#xe60b;</i>&nbsp;关于</a>
                    <dl class="layui-nav-child">
                        <dd>
                            <a onclick="github()" href="javascript:void(0)">Github</a>
                        </dd>
                        <dd>
                            <a onclick="gitee()" href="javascript:void(0)">Gitee</a>
                        </dd>
                    </dl>
                </li>
                <!--广告：屏蔽即可-->
                <!--<p style="margin-top: 30px;">-->
                    <!--<img src="https://gitee.com/zyzpp/JavaMonitor/raw/master/picture/didiyun.png" width="100px"><br><a href="https://www.didiyun.com/?channel=14214" style="color: #9a9090;">滴滴云免费提供云计算服务</a>-->
                <!--</p>-->
            </ul>
        </div>
    </div>

    <div class="layui-body" style="top: 0px;overflow-y: hidden">
        <!-- 内容主体区域 -->
        <iframe id="iframe" height="100%" width="100%" src="/main" frameborder="no" allowtransparency="yes"></iframe>
    </div>

</div>
<script src="/lib/layui/layui.all.js"></script>
<script type="text/javascript" src="/lib/jquery.min.js"></script>
<script type="text/javascript">
    function step(address,id){
        $("#iframe").attr("src","/monitor?pid="+id+"&address="+address);
        //加载动画
        layer.load();
        setTimeout(function () {
            layer.closeAll('loading');
        }, 2000);
    }
    function index() {
        $("#iframe").attr("src","/main");
    }
    function github() {
        window.open("//github.com/yueshutong/JavaMonitor")
    }
    function gitee() {
        window.open("//gitee.com/zyzpp/JavaMonitor");
    }
</script>
</body>
</html>
